import QueryString from "qs";
import React from "react";
import { useLocation } from "react-router-dom";
import { Swiper } from "react-vant";

const User = () => {
  const location = useLocation();

  const { title, desc, id, image } = QueryString.parse(
    location.search.slice(1)
  );

  return (
    <div>
      {/* <img src={image} alt="" width="100%"/> */}
      <Swiper>
        {image.map((v, i) => {
          return (
            <Swiper.Item key={i}>
              <img src={v} alt="" width="100%" height={200} />
            </Swiper.Item>
          );
        })}
      </Swiper>
      <h2>{title}</h2>
      <p>{desc}</p>
    </div>
  );
};

export default User;
